package org.cytoscape.myapp.my_cyaction_app.internal;

import java.util.List;
import java.util.Set;
import java.util.Vector;

import org.cytoscape.group.CyGroup;
import org.cytoscape.group.CyGroupFactory;
import org.cytoscape.group.CyGroupManager;
import org.cytoscape.model.CyNetwork;

public class GenerateGroups {
	
	private Vector<CySorter> clasificadores;
	private CyGroupManager cyGroupManager;
	private CyGroupFactory cyGroupFactory;
	
	public GenerateGroups() {
		// TODO Auto-generated constructor stub
	}
	
	public void GenerateGroups(CyNetwork network){
		for (CySorter clasificador: clasificadores){
			cyGroupManager.addGroup(clasificador.GetCyGroupClasificated(network));
		}
		CollapsedAllGroups(network);
	}
	private void CollapsedAllGroups(CyNetwork network){
		Set<CyGroup> grupos = cyGroupManager.getGroupSet(network);
		for (CyGroup grupo:grupos){
			grupo.collapse(network);
		}
	}
	

}
